package com.rephilo.base;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;

/**
 * 启动类
 *
 * @author rephilo
 */
public class SpringBootApplication {
    /**
     * 启动方法
     */
    public static void run() {
        try {
            Tomcat tomcat = new Tomcat();
            tomcat.setPort(8080);
//            tomcat.addWebapp("/", "C:\\");
            tomcat.addWebapp("/", "/");
            tomcat.start();
            tomcat.getServer().await();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
